# Contributor: Jean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>
# Maintainer: Jean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>
pkgname=vice
pkgver=3.7.1
pkgrel=0
pkgdesc="emulates the C64/DTV, C128, VIC20, almost all PETs, PLUS4 and CBM-II"
url="https://vice-emu.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
makedepends="gtk+3.0-dev glew-dev giflib-dev ffmpeg4-dev jpeg-dev libpng-dev alsa-lib-dev
	linux-headers texinfo automake autoconf bison flex xa bdftopcf
	bash"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/vice-emu/vice-$pkgver.tar.gz
	disable-fc-cache.patch
	"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure --prefix=/usr \
		--libdir=/usr/lib \
		--enable-native-gtk3ui \
		--enable-x64 \
		--disable-no-pic \
		--disable-pdf-docs \
		--without-pulse \
		--enable-external-ffmpeg
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

check() {
	make -C "$builddir" check
}

sha512sums="
80f81dd4d163cc5030eee2908b274bce4f3f21a3adb6d01559f4695d58b27ebc7b7570d8896718dfe74b2f2e4983ed3f9c4919b6e81934063d344b543b081f30  vice-3.7.1.tar.gz
ed6fee34eefcb04c42b4575591dfeffca8548eae354dee66dabdbc4abac0311cbbedcdc07cdfcb01da4840d57ab331a31583e17160820462a2c064835a75d75d  disable-fc-cache.patch
"
